package com.wissen.proxy;
/**
 * this proxy class for real bank object
 * @author wissen16
 * @param Bank object of bank class
 */
public class ProxyCreditCard{
	BankAccount Bank=new BankAccount();
	/**
	 * this method withdraw original money from bank 
	 * @param marchant
	 * @param amount
	 * @return withdraw amount
	 */
	public boolean withdraw(String marchant,int amount){
		if(marchant.equals("BIG-BAZZAR")||marchant.equals("CITY-CENTER")||marchant.equals("COMPUTER-SHOPEE"))
			return Bank.withdraw(amount);
		else
			return false;
	}
	/**
	 * gives current balance
	 * @return balance
	 */
	int getBalance(){
		return Bank.getBalance();
	}
}

